<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="Bookmark" href="favicon.ico">
    <link rel="Shortcut Icon" href="favicon.ico"/>
    <!--[if lt IE 9]>
    <script type="text/javascript" src="/static/admin/lib/html5.js"></script>
    <script type="text/javascript" src="/static/admin/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/static/admin/static/h-ui/css/H-ui.min.css"/>
    <link rel="stylesheet" type="text/css" href="/static/admin/static/h-ui.admin/css/H-ui.admin.css"/>
    <link rel="stylesheet" type="text/css" href="/static/admin/lib/Hui-iconfont/1.0.8/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="/static/admin/static/h-ui.admin/skin/default/skin.css" id="skin"/>
    <link rel="stylesheet" type="text/css" href="/static/admin/static/h-ui.admin/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="/static/bootstrap/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/static/admin/lib/layer/2.4/skin/layer.css"/>
    <!--[if IE 6]>
    <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <!--/meta 作为公共模版分离出去-->
    <title>后台管理系统</title>
</head>

<body>
<!--_header 作为公共模版分离出去-->
<header class="navbar-wrapper">
    <div class="navbar navbar-fixed-top">
        <div class="container-fluid cl"><a class="logo navbar-logo f-l mr-10 hidden-xs" href="/">后台</a>
            <a class="logo navbar-logo-m f-l mr-10 visible-xs" href="/">后台</a>
            <span class="logo navbar-slogan f-l mr-10 hidden-xs">v1.0</span>
            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:;">&#xe667;</a>
            <nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
                <ul class="cl">
                    <li class="dropDown dropDown_hover"><a href="#" class="dropDown_A">admin <i class="Hui-iconfont">&#xe6d5;</i></a>
                        <ul class="dropDown-menu menu radius box-shadow">
                            <li><a href="#">修改密码</a></li>
                            <li><a class="logout" link="{:url('Login/logout')}">退出</a></li>
                        </ul>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</header>
<!--/_header 作为公共模版分离出去-->
<!--_menu 作为公共模版分离出去-->
{include file='public/left' /}
<!--/_menu 作为公共模版分离出去-->
{block name="content"}{/block}
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/static/admin/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/admin/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/admin/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="/static/admin/static/h-ui.admin/js/H-ui.admin.page.js"></script>
<!--/_footer /作为公共模版分离出去-->
<script type="text/javascript">
    $(function () {
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });
        // 表单ajax提交
        $('form').submit(function () {
            var self = $(this);
            $.post(self.attr("action"), self.serialize(), success, "json");
            return false;

            function success(data) {
                if (data.code) {
                    layer.alert(data.msg, {icon: 6}, function (index) {
                        layer.close(index);
                        window.location.href = data.url;
                    });
                } else {
                    layer.alert(data.msg, {icon: 5}, function (index) {
                        layer.close(index);
                    });
                }
            }
        });

        // 退出
        $('.logout').click(function () {
            var url = $(this).attr('link');

            layer.confirm('你确定要退出吗', {
                icon: 5,
                btn: ['确定', '取消'] //按钮
            }, function () {
                $.get(url, function (data) {
                    if (data.code == 1) {
                        layer.msg(data.msg, {
                                icon: 6,
                                time: 1000, //1s后自动关闭
                            },
                            function (index) {
                                layer.close(index);
                                window.location.href = data.url;
                            }
                        );
                    } else {
                        layer.alert(data.msg, {icon: 5, time: 1000});
                    }
                });
            }, function () {
                layer.msg('取消删除', {icon: 2});
            });
        });
        // 删除
        $('.del').click(function () {
            var url = $(this).attr('link');

            layer.confirm('你确定要删除吗', {
                icon: 5,
                btn: ['确定', '取消'] //按钮
            }, function () {
                $.get(url, function (data) {
                    if (data.code == 1) {
                        layer.msg(data.msg, {
                                icon: 6,
                                time: 1000, //1s后自动关闭
                            },
                            function (index) {
                                layer.close(index);
                                window.location.href = data.url;
                            }
                        );
                    } else {
                        layer.alert(data.msg, {icon: 5});
                    }
                });
            }, function () {
                layer.msg('取消删除', {icon: 2});
            });
        });
        // 切换状态
        $('.setStatus').click(function () {
            var url = $(this).attr('link');

            layer.confirm('确定操作吗', {
                icon: 5,
                btn: ['确定', '取消'] //按钮
            }, function () {
                $.get(url, function (data) {
                    if (data.code == 1) {
                        layer.msg(data.msg, {
                                icon: 6,
                                time: 1000, //1s后自动关闭
                            },
                            function (index) {
                                layer.close(index);
                                window.location.href = data.url;
                            }
                        );
                    } else {
                        layer.alert(data.msg, {icon: 5});
                    }
                });
            }, function () {
                layer.msg('取消', {icon: 2});
            });
        });
    });
</script>
<!--请在下方写此页面业务相关的脚本-->
{block name="js"}{/block}
<!--/请在上方写此页面业务相关的脚本-->
</body>

</html>